package com.springboot.returndata.dto.blog;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import jakarta.validation.constraints.NotNull;


/**
 * @ClassName UserEamilRegisterDto
 * @Description
 * @Author zyj
 * @Date 2023/5/18 13:17
 * @Version 1.0
 **/
@Data
public class UserEamilRegisterDto {

    /**
     * 名称
     */
   @NotNull(message = "名称不能为空")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5_a-zA-Z0-9]{1,10}$", message = "名称不合法")
    private String userName;

    /**
     * 邮箱
     */
   @NotNull(message = "邮箱不能为空")
   @Email(message = "邮箱格式错误")
    private String userEmail;


    /**
     * 密码
     */
   @NotNull(message = "密码不能为空")
    @Pattern(regexp = "[A-Za-z0-9]{6,10}$", message = "密码不合法")
    private String pwd;

    /**
     * 邮箱校验码
     */
   @NotNull(message = "邮箱校验码不能为空")
    private String sendId;

    /**
     * 邮箱校验码
     */
   @NotNull(message = "邮箱校验码不能为空")
    private String emailCode;
}
